<!-- 新闻详情页 -->
<template>
	<view>
		<view class="title">
			{{detail.desc}}
		</view>
		<view class="time">
			{{detail.createtime}}
		</view>
		<view class="content" v-html="detail.content">
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				id:"",
				detail:{}
			}
		},
		onLoad(e) {
			this.id = e.id;
			this.newsdetail();
		},
		methods:{
			// 获取新闻详情
			newsdetail() {
				let that = this;
				that.$myRequest({
					url: 'addons/track/news/detail', //请求地址
					method: 'GET', //请求方式
					data: {
						id: that.id
					} //请求参数
				}).then(res => {
					if(res.data.code == 1) {
						that.detail = res.data.data;
					}
				})
			}
		}
	}
</script>
<style lang="scss" scoped>
	.title {
		width: 91.5%;
		font-size: 36rpx;
		color: #333333;
		margin: 32rpx auto 0;
	}
	.time {
		width: 91.5%;
		font-size: 24rpx;
		color: #999999;
		margin: 32rpx auto;
	}
	.content {
		width: 91.5%;
		margin: auto;
	}
</style>